﻿using AutoMapper;
using Electric.Entity.Accounts;
using Electric.Entity.Permissions;
using Electric.Entity.Roles;
using Electric.Entity.Users;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Electric.Entity.Commons
{
    public class MappingProfile : Profile
    {
        public MappingProfile()
        {
            CreateMap<ElePermission, AccountPermissionsDto>().ReverseMap();
            CreateMap<ElePermission, PermissionDto>().ReverseMap();
            CreateMap<PermissionCreateDto, ElePermission>().ReverseMap();
            CreateMap<PermissionUpdateDto, ElePermission>().ReverseMap();

            CreateMap<EleUser, UserDto>().ReverseMap();
            CreateMap<EleUser, UserAllDto>().ReverseMap();
            CreateMap<UserUpdateDto, EleUser>().ReverseMap();
            CreateMap<UserCreateDto, EleUser>().ReverseMap();

            CreateMap<EleRole, RoleDto>().ReverseMap();
            CreateMap<RoleCreateDto, EleRole>().ReverseMap();
            CreateMap<RoleUpdateDto, EleRole>().ReverseMap();
        }
    }

     
}